#include <stdio.h>
#include <string.h>
#define kong "                             "

char ss[610][30];
int match[500000];
int n_match=0;

void output(int a,int b)
{
	int i;
	int min;
	min=a>b?b:a;
	
	if (min==0)
		printf("%d / %d\n",a,b);
	else
	{	
		for (i=min;i>=2;i--)
			if (a%i==0 && b%i==0)
			{
				a/=i;
				b/=i;
				i++;
			}
		printf("%d / %d\n",a,b);
	}
}

main()
{
	int i,j;
	char in[30], ch;
	int head;
	int num;
	int over;

//	freopen("input", "r", stdin);

	num=0;
	head=0;
	over=0;	
	strcpy(in,kong);
	while (scanf("%c", &ch)!=EOF)
	{
//		if (ch>='a' && ch<='z') 
//			ch+='A'-'a';
		if ((ch>='A' && ch<='Z' ) || (ch>='a' && ch<='z'))
		{
			in[head++]=ch;
		}
		else
		{ 
			if (head!=0)
			{
				in[head]='\0';
				num++;
				strcpy(ss[num],in);
				if (strcmp(in,"BULLSHIT")==0) over=1;

				strcpy(in,kong);
				head=0;
			}
		}

		if (over)
		{
			num--;
			over=0;
			n_match++;
			match[n_match]=num;
			for (i=1;i<=num;i++)
			{
				for (j=0;j<strlen(ss[i]);j++)
					if (ss[i][j]>='a' && ss[i][j]<='z') 
						ss[i][j]+='A'-'a';
			}
			for (i=1;i<num;i++)
			{
				for (j=i+1;j<=num;j++)
					if (strcmp(ss[i],ss[j])==0)
					{
						match[n_match]--;
						break;
					}
			}
			num=0;
			head=0;
		}
	} // end of while 

	if (head!=0)
	{
		in[head]='\0';
		num++;
		strcpy(ss[num],in);
		if (strcmp(in,"BULLSHIT")==0) over=1;
		
		strcpy(in,kong);
		head=0;
	}
	if (over)
	{
		num--;
		over=0;
		n_match++;
		match[n_match]=num;
		for (i=1;i<num;i++)
		{
			for (j=i+1;j<=num;j++)
				if (strcmp(ss[i],ss[j])==0)
				{
					match[n_match]--;
					break;
				}
		}
		num=0;
		head=0;
	}

	for (i=1,j=0;i<=n_match;i++)
	{
		j+=match[i];
//		printf("num:%d tot=%d\n", i, match[i]);
	}
	output(j,n_match);
	

	return 0;
}

